﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Diagnostics;
using HighVoltz.HBRelogApi;

namespace ShutUp_AIML
{
    partial class ChatHelper
    {
        private static void HBRelog_ARelog_Support()
        {
            HBRelogApi hbRelog = new HBRelogApi();

            if (hbRelog.IsConnected)
            {
                ShutUp_AIML.slog(Colors.Red, "deactivate HBRelog - Profile: {0}", hbRelog.CurrentProfileName);
                hbRelog.StopProfile(hbRelog.CurrentProfileName);
                hbRelog.SetProfileStatusText("[ShutUp] - GM-Alarm - " + DateTime.Now.ToString());
            }
            else
            {
                Process[] procs = Process.GetProcessesByName("ARelog");
                if(procs != null)
                    foreach (Process _procs in procs)
                    {
                        ShutUp_AIML.slog(Colors.Red, "deactivate {0} ", _procs.ProcessName);
                        _procs.Kill();
                    }
            }
        }
    }
}
